home
diamond Go Premium
Data Engineering Path  ·  Airflow
Apache Airflow Logo

Theoretical Quiz — Module 6

📝 Final Assessment

Q1. What does "idempotency" mean in the context of Airflow tasks? Why is it important?

Show Answer

An idempotent task produces the same result regardless of how many times it runs for the same logical date. This is critical because Airflow supports retries and manual re-runs. Without idempotency, re-running a task could duplicate data. The pattern is: DELETE existing data for the date, then INSERT fresh data.


Q2. List 5 best practices for running Airflow in production.

Show Answer
  1. Always set catchup=False and max_active_runs=1
  2. Use Connections for all credentials (never hardcode)
  3. Set retries, timeouts, and SLA alerts on every task
  4. Never process large data inside Airflow workers
  5. Run DAG validation tests in CI/CD before deploying

Q3. Why should you avoid running code at the top level of a DAG file?

Show Answer

The scheduler re-parses DAG files every 30 seconds (configurable). Any code at the top level (outside of tasks) runs during every parse cycle. This means API calls, database queries, or expensive computations at the top level will execute thousands of times per day, potentially causing rate limiting, credential issues, and performance degradation.


Q4. Design a notification strategy for a critical production pipeline. What layers of alerting would you implement?

Show Answer
  1. Task-level: email_on_failure=True in default_args for immediate notification
  2. DAG-level: on_failure_callback to send Slack/PagerDuty alerts
  3. SLA monitoring: sla=timedelta(hours=1) for time-sensitive pipelines
  4. DAG Run timeout: dagrun_timeout=timedelta(hours=3) to catch stuck pipelines
  5. Meta-monitoring: A separate "health check" DAG that monitors other DAGs
lock

This content is reserved for Premium Members.

Upgrade to Premium

Entity Details

Create New Item

help

Submit Technical Query

Have a question or run into an issue? Describe it below, upload an optional screenshot, and our engineering team will answer it!

image Attach image (optional)

Submit Feedback

build Free Developer Utility Free Tool
gavel

Privacy & Legal Disclaimer

1. Client-Side Browser Processing

All utility tools on DeepEngineerHub (including Image to PDF, Text Formatters, JSON Converters, and Encryptors) execute 100% locally within your client browser using WebAssembly and JavaScript. No uploaded images, text, or documents are transmitted, collected, or stored on remote servers.

2. Limitation of Liability ("As-Is" Provision)

Tools and services are provided free of charge for convenience and educational purposes "as-is" without warranties of any kind. DeepEngineerHub shall not be held liable for any data loss, formatting inconsistencies, or indirect damages resulting from tool usage.

3. Open Source & Third-Party Software

Certain utilities utilize open-source client libraries (such as jsPDF, Mermaid.js, Pyodide) licensed under MIT, Apache, or BSD open licenses. All intellectual property remains with their respective copyright holders.